package com.beametl.sample.directrunner;

import com.beametl.sample.origin.JDBCToJDBCSampleOrigin;

import org.apache.beam.runners.direct.DirectRunner;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;

/*关系型数据库到关系数据库之间的ETL传输样例*/
public class JDBCToJDBCSample {
        public static void main(String[] args) {
                PipelineOptions pipe = PipelineOptionsFactory.create();
                pipe.setRunner(DirectRunner.class);
                Pipeline pipeline = Pipeline.create(pipe);

                JDBCToJDBCSampleOrigin.dealWithPipeline(pipeline);

                pipeline.run().waitUntilFinish();
        }
}
